//(c) 2008 CompuVest Corp, author M.Davidov, davidovmi @ comcast.net, Ver3
var bN=navigator.appName=="Netscape"?1:0;
var timeOut;
var timeDelay=700;
var mWidth=158;
function menu(){
 var y=document.getElementById("menu");
 setH(y);
 x=y.getElementsByTagName("LI");
 for(var i=0;i<x.length;i++){
  var y=x[i].getElementsByTagName("UL");
  if(y.length&&!bN){x[i].onmouseover=function(){
   showM(this)};
   x[i].onmouseout=function(){hideMbase(this)};
   x[i].onmouseleave=function(){hideMleft(this)};
   y[0].onmouseleave=function(){showSub(this)};
  }
 }
}
function showM(a){
 window.status="showM";
 var z=a.getElementsByTagName("UL");
 if(z.length)z[0].style.display="block";
}
function hideMbase(a){
 window.status ="hideMbase";
 var z=a.getElementsByTagName("UL");
 if(z.length) z[0].style.display="none";
}
function hideMleft(a){
 window.status ="hideMleft";
 if(window.event.x<mWidth){
  var z=a.getElementsByTagName("UL");
  if(z.length) z[0].style.display="none";
 }
}
function setH(a){
 var oTop=a.offsetTop;
 if(bN) var mH=document.getElementById("menublock").clientHeight;
 else var mH=a.clientHeight;
 var x=a.getElementsByTagName("UL");
 var oneH=x[0].parentNode.clientHeight;
 for(var i=1;i<x.length;i++){
  var y=x[i].parentNode.offsetTop;
  var z=x[i].getElementsByTagName("UL");
  if(!y||z.length) continue;
  else{
   var z=x[i].getElementsByTagName("LI");
   var iH=parseInt(oneH*z.length);
   if(mH+oTop<iH){
    var t=parseInt(-1*(y+oTop));
    x[i].style.top=t;
    continue;
   }
   var t=y+iH<=mH ? 0:mH-y-iH;
   x[i].style.top=t;
  }
 }
}
var sub;
function showSub(a){
 window.status="showSub";
 if(window.event.x<mWidth) return;
 a.style.display="block";
 sub=a;
 timeOut=setTimeout("fEm()",timeDelay);
}
function fEm(){
 window.status="fEm";
 sub.style.display="none";
 clearTimeout(timeOut);
}
//
function hideErr(a){a.parentNode.style.visibility="hidden";}
function sha(a){
 var x=document.getElementById(a);
 if(!x) return;
 if(x.style.display=="block") x.style.display="none";
 else x.style.display="block";
}
function sw(){
 var s=location.href;
 var a="";
 if(s.indexOf('#')>0){
  a=s.substring(s.indexOf('#')+1,s.length);
  sha(a);
 }
}
